package cn.stylefeng.guns.modular.yingbao.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * <p>
 * 用户团队表
 * </p>
 *
 * @author jj
 * @since 2019-12-18
 */
@TableName("yingbao_sys_user_group")
public class SysUserGroup implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;

    /**
     * 用户id
     */
    @TableField("userid")
    private Long userid;

    /**
     * 推荐人id
     */
    @TableField("referrer_id")
    private Long referrerId;

    /**
     * 上上级推荐人id
     */
    @TableField("sj_referrer_id")
    private Long sjReferrerId;

    /**
     * 照片地址
     */
    @TableField("avatar")
    private String avatar;

    /**
     * 用户名
     */
    @TableField("user_name")
    private String userName;

    /**
     * 团队人数
     */
    @TableField("group_size")
    private Integer groupSize;

    /**
     * 是否是新手
     */
    @TableField("is_newbie")
    private Integer isNewbie;

    /**
     * 订单数
     */
    @TableField("ordinal_size")
    private Long ordinalSize;

    /**
     * 团队订单数
     */
    @TableField("group_ordinal_size")
    private Long groupOrdinalSize;

    /**
     * 每轮的团队人数
     */
    @TableField("team_id" )
    private String teamId;

    /**
     * 等级
     */
    @TableField("grade")
    private Integer grade;

    /**
    * @description :收益金额
    * @param null
    * @date : 2019/12/20 16:14
    * @author : jj
    */
    @TableField("money")
    private Long money;
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 乐观锁
     */
    @TableField("version")
    private Integer version;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public Long getReferrerId() {
        return referrerId;
    }

    public void setReferrerId(Long referrerId) {
        this.referrerId = referrerId;
    }

    public Long getSjReferrerId() {
        return sjReferrerId;
    }

    public void setSjReferrerId(Long sjReferrerId) {
        this.sjReferrerId = sjReferrerId;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getGroupSize() {
        return groupSize;
    }

    public void setGroupSize(Integer groupSize) {
        this.groupSize = groupSize;
    }

    public Long getOrdinalSize() {
        return ordinalSize;
    }

    public void setOrdinalSize(Long ordinalSize) {
        this.ordinalSize = ordinalSize;
    }

    public Integer getGrade() {
        return grade;
    }

    public Long getGroupOrdinalSize() {
        return groupOrdinalSize;
    }

    public Integer getIsNewbie() {
        return isNewbie;
    }

    public void setIsNewbie(Integer isNewbie) {
        this.isNewbie = isNewbie;
    }

    public void setGroupOrdinalSize(Long groupOrdinalSize) {
        this.groupOrdinalSize = groupOrdinalSize;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Long getMoney() {
        return money;
    }

    public void setMoney(Long money) {
        this.money = money;
    }

    public String getTeamId() {
        return teamId;
    }

    public void setTeamId(String teamId) {
        this.teamId = teamId;
    }


    @Override
    public String toString() {
        return "SysUserGroup{" +
                "id=" + id +
                ", userid=" + userid +
                ", referrerId=" + referrerId +
                ", sjReferrerId=" + sjReferrerId +
                ", avatar='" + avatar + '\'' +
                ", userName='" + userName + '\'' +
                ", groupSize=" + groupSize +
                ", isNewbie=" + isNewbie +
                ", ordinalSize=" + ordinalSize +
                ", groupOrdinalSize=" + groupOrdinalSize +
                ", teamId=" + teamId +
                ", grade=" + grade +
                ", money=" + money +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", version=" + version +
                '}';
    }
}
